import * as bcrypt from 'bcryptjs';

// const salt = 'woshinibaba';
export const hash = async (text: string) => {
  const salt = bcrypt.genSaltSync(10);
  const hash = bcrypt.hashSync(text, salt);

  return hash;
};

export const verify = async (password, hash) => {
  const result = await bcrypt.compare(password, hash);

  return result;
};
